<?php

class Domain_Demo
{

    private $demoModel;

    public function __construct()
    {
        $this->demoModel = new Model_Demo();
    }

    public function demoList()
    {
        return $this->demoModel->demoList();
    }

    public function demoAdd($title, $content)
    {
        $data = array();
        $data['title'] = $title;
        $data['content'] = $content;
        $data['createtime'] = time();
        $data['updatetime'] = time();

        return $this->demoModel->demoAdd($data);
    }

    public function demoDel($id)
    {
        return $this->demoModel->demoDel($id);
    }

    public function addOpenID($openID)
    {
        return $this->demoModel->addOpenID($openID);
    }

    public function addFiles($url)
    {
        return $this->demoModel->addFiles($url);
    }

}
